﻿namespace ABlog.Domain.Infrastructure
{
    /// <summary>
    /// 日志
    /// </summary>
    public interface ILogger : IDependency
    {
        /// <summary>
        /// 添加日志
        /// </summary>
        /// <param name="typeEnum">日志类型</param>
        /// <param name="msg">日志内容{json}</param>
        void AddLog(LogTypeEnum typeEnum, string msg);
    }

    /// <summary>
    /// 日志类型
    /// </summary>
    public enum LogTypeEnum
    {
        /// <summary>
        /// 后台日志
        /// </summary>
        AdminOperate = 1,
        /// <summary>
        /// 用户日志
        /// </summary>
        UserOperate = 2,
        /// <summary>
        /// 错误日志
        /// </summary>
        ErrOperate = 3,
        /// <summary>
        /// 其他日志
        /// </summary>
        OtherOperate = 4
    }
}
